#ifndef OPERATION_H
#define OPERATION_H

#include <stdbool.h>

typedef struct
{
    char key[20];
    char value[20];
} MessageKeyValue;

typedef struct
{
    const char *operation;
    bool (*action)(void);
} OperationHandler;

typedef struct
{
    const char *entity;
    OperationHandler *operations;
    int num_operations;
} EntityHandler;

bool parse_mqtt_message(MessageKeyValue *kvp, const char *message);
bool handle_message(const MessageKeyValue *msg);

#endif
